Sign Function

Description

Returns -1 if the number is negative, 0 for zero, and 1 if the number is positive

To execute the program, run label C.

Author: Edward Shore

Program resources

Labels

Name Description
C Sign Function
0 Temporary Label Used

Program

Line Display Key Sequence
000
001 42.21.13 f LBL C
002 43 20 g x=0
003 43 32 g RTN
004 43.30. 2 g TEST x<0
005 22 0 GTO 0
006 1 1
007 43 32 g RTN
008 42.21. 0 f LBL 0
009 1 1
010 16 CHS
011 43 32 g RTN